<?php

require_once("../../controllers/init.php");
require_once($FILE_SYSTEM_ROOT."/controllers/authentication.php");

echo $_POST['eventID'].": ".$_POST['attach'];

$event = new Event($_POST['eventID']);
$event->setMusicList($_POST['attach']);

if($_POST['attach']=='true')$event->attachToMusicList();
else $event->detachFromMusicList();

?>